Skip to content

chore(ci): deduplicate compiler warning annotations across the matrix - #1207

Open
spydon wants to merge 2 commits into
mainfrom
ci/deduplicate-warning-annotations
Open

spydon wants to merge 2 commits into
mainfrom
ci/deduplicate-warning-annotations

Conversation

@spydon

@spydon spydon commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What

Every xcodebuild job compiles the same sources, so each compiler warning was annotated once per matrix leg, and more than once within a leg where several targets compile the same file. On #1088 a single deprecation landed on the same line ten-plus times.

Annotations belong to the check run that emits them, so they can't be merged after the fact. The matrix jobs now only collect their warnings; a new warnings job annotates the deduplicated union once.

How

  • scripts/collect-warnings.sh (new) parses a raw xcodebuild/swift build log into deduplicated path⇥line⇥column⇥message records relative to the repository root. Diagnostics for files GitHub can't annotate anyway (dependency checkouts, .build, .derivedData) are dropped, they currently land on .github as a fallback.
  • scripts/annotate-warnings.sh (new) merges every job's file, emits one annotation per unique warning, and writes the full table to the job summary, since GitHub only displays the first handful of annotations per step.
  • scripts/xcodebuild.sh, when WARNINGS_FILE is set, tees the raw log, filters xcbeautify's ::warning/::notice lines out of the live stream, and appends collected warnings to that file. Exit status is preserved and warnings are still collected when the build fails. ::error annotations are left alone, those belong to the job that failed. With WARNINGS_FILE unset, local runs behave exactly as before.
  • ci.yml: macos, macos-legacy and examples set WARNINGS_FILE and upload a warnings-* artifact (1 day retention); the new warnings job downloads them all and annotates once. It is deliberately not part of ci-success, it reports rather than gates.

Side effect: the duplicated Test run with N tests passed notice annotations (8 per test leg) are gone as well.

Verification

  • shellcheck clean on all three scripts; actionlint reports only pre-existing findings (Blacksmith runner labels, format-check's SC2086); cSpell passes.
  • Scripts tested against a log built from the actual diagnostics in fix(auth)!: return VerifyOTPResponse from verifyOTP instead of AuthResponse #1088's run: dedupe across legs, % escaping in messages, dependency-path filtering, indented diagnostics.
  • xcodebuild.sh driven with stub xcodebuild/xcbeautify binaries for four cases: collecting, failing build (exit 65 preserved, warnings still collected), WARNINGS_FILE unset, and no xcbeautify on PATH.

Known limitation

Derived data is cached, so an unchanged file may not be recompiled and its warning may not appear in a given run. That's pre-existing (it's why the legs report differing counts today), but it becomes more visible with a single annotator.

Every xcodebuild job compiles the same sources, so each warning was annotated
once per matrix leg, and more than once within a leg where several targets
compile the same file. A single deprecation showed up ten-plus times on the same
line of a pull request diff.

Annotations belong to the check run that emits them, so they cannot be merged
after the fact: the matrix jobs now only collect their warnings and a new
`warnings` job annotates the deduplicated union once.

- scripts/collect-warnings.sh parses a raw build log into deduplicated
  path/line/column/message records relative to the repository root, dropping
  diagnostics for files GitHub cannot annotate anyway (dependency checkouts,
  .build, .derivedData).
- scripts/annotate-warnings.sh merges every job's file, annotates each unique
  warning once and writes the full list to the job summary, since GitHub only
  displays the first handful of annotations per step.
- scripts/xcodebuild.sh, when WARNINGS_FILE is set, tees the raw log, filters
  xcbeautify's warning and notice annotations out of the live stream and appends
  the collected warnings to that file. Exit status is preserved and warnings are
  collected even when the build fails. Error annotations are left alone: those
  belong to the job that failed. With WARNINGS_FILE unset, behavior is unchanged
  for local runs.

The `warnings` job is deliberately not part of `ci-success`: it reports, it does
not gate. As a side effect the duplicated "Test run with N tests passed" notice
annotations are gone too.
@spydon
spydon requested review from a team and grdsdev as code owners August 13, 2026 15:10
@github-actions github-actions Bot added the ci/cd label Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7ef3addc-3d05-47e6-b857-3185816c788d

📥 Commits

Reviewing files that changed from the base of the PR and between 6182b19 and 80e474d.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • AGENTS.md
  • dictionary.txt
  • scripts/annotate-warnings.sh
  • scripts/collect-warnings.sh
  • scripts/xcodebuild.sh

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • CI now collects, deduplicates, and annotates compiler warnings from macOS builds.
    • Build summaries include consolidated warning details for easier review.
  • Documentation
    • Added guidance on CI warning collection and clarified that local builds remain unchanged unless warning collection is enabled.
  • Build Improvements
    • Build output handling now preserves the original build status while optionally collecting warnings.

Walkthrough

The build wrapper now captures raw output when WARNINGS_FILE is set, filters warning and notice annotations, preserves the original build status, and collects deduplicated warning records. CI uploads warning files from macOS, legacy macOS, and examples jobs. A non-gating warnings job downloads available artifacts and runs annotate-warnings.sh. The annotation script writes a job summary and emits GitHub warning annotations. Documentation describes the workflow.

Mergeability Score: ⚪ Minimal · up to 80e47

This change centralizes duplicate compiler-warning annotations while preserving build exit status and local behavior; no actionable merge-blocking risk remains beyond normal checks and review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

coveralls commented Aug 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31716393287

Coverage decreased (-1.5%) to 83.823%

Details

  • Coverage decreased (-1.5%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 163 coverage regressions across 8 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

163 previously-covered lines in 8 files lost coverage.

File Lines Losing Coverage Coverage
Sources/Auth/AuthClient.swift 70 81.88%
Sources/Auth/Types.swift 29 77.45%
Sources/Supabase/Types.swift 20 64.29%
Sources/Auth/AuthClientConfiguration.swift 16 62.75%
Sources/RealtimeV2/RealtimeChannelV2.swift 11 67.72%
Sources/Storage/SupabaseStorage.swift 9 20.0%
Sources/Storage/Codable.swift 5 0.0%
Sources/Auth/AuthStateChangeListener.swift 3 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 10379
Covered Lines: 8700
Line Coverage: 83.82%
Coverage Strength: 3724358.85 hits per line

💛 - Coveralls

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Capability matrix drift detected

The following capabilities are marked implemented in swift but have no registered symbols to verify:

  • auth.passkey.register_passkey (no symbols list — cannot confirm implementation exists)
  • auth.passkey.sign_in_with_passkey (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.third_party_auth (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.cross_client_token_sync (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.oauth_flow_type (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.session_url_detection (no symbols list — cannot confirm implementation exists)
  • client.session_management.custom_storage (no symbols list — cannot confirm implementation exists)
  • client.session_management.persist_session (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.global_headers (no symbols list — cannot confirm implementation exists)
  • client.observability.trace_propagation (no symbols list — cannot confirm implementation exists)
  • database.query.select (no symbols list — cannot confirm implementation exists)
  • database.query.schema_selection (no symbols list — cannot confirm implementation exists)
  • database.query.rpc (no symbols list — cannot confirm implementation exists)
  • database.mutate.insert (no symbols list — cannot confirm implementation exists)
  • database.mutate.update (no symbols list — cannot confirm implementation exists)
  • database.mutate.upsert (no symbols list — cannot confirm implementation exists)
  • database.mutate.delete (no symbols list — cannot confirm implementation exists)
  • database.mutate.select_after_mutation (no symbols list — cannot confirm implementation exists)
  • database.using_filters.eq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.neq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike (no symbols list — cannot confirm implementation exists)
  • database.using_filters.is (no symbols list — cannot confirm implementation exists)
  • database.using_filters.in (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contains (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contained_by (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_adjacent (no symbols list — cannot confirm implementation exists)
  • database.using_filters.overlaps (no symbols list — cannot confirm implementation exists)
  • database.using_filters.text_search (no symbols list — cannot confirm implementation exists)
  • database.using_filters.match (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not (no symbols list — cannot confirm implementation exists)
  • database.using_filters.or (no symbols list — cannot confirm implementation exists)
  • database.using_filters.raw (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex_icase (no symbols list — cannot confirm implementation exists)
  • database.using_filters.is_distinct (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like_all (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like_any (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike_all (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike_any (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.order (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.limit (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.range (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.single_row (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.strip_nulls (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.format_csv (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.format_geojson (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.max_affected_rows (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.request_cancellation (no symbols list — cannot confirm implementation exists)
  • database.configuration.auto_retry (no symbols list — cannot confirm implementation exists)
  • functions.invocation.invoke (no symbols list — cannot confirm implementation exists)
  • functions.invocation.set_auth_token (no symbols list — cannot confirm implementation exists)
  • functions.invocation.method_override (no symbols list — cannot confirm implementation exists)
  • functions.invocation.streaming_response (no symbols list — cannot confirm implementation exists)
  • functions.invocation.request_cancellation (no symbols list — cannot confirm implementation exists)
  • realtime.client.connect (no symbols list — cannot confirm implementation exists)
  • realtime.client.disconnect (no symbols list — cannot confirm implementation exists)
  • realtime.client.get_channels (no symbols list — cannot confirm implementation exists)
  • realtime.client.remove_channel (no symbols list — cannot confirm implementation exists)
  • realtime.client.remove_all_channels (no symbols list — cannot confirm implementation exists)
  • realtime.client.connection_state (no symbols list — cannot confirm implementation exists)
  • realtime.client.listen_heartbeats (no symbols list — cannot confirm implementation exists)
  • realtime.client.set_auth_token (no symbols list — cannot confirm implementation exists)
  • realtime.client.channel (no symbols list — cannot confirm implementation exists)
  • realtime.channel.subscribe (no symbols list — cannot confirm implementation exists)
  • realtime.channel.unsubscribe (no symbols list — cannot confirm implementation exists)
  • realtime.channel.broadcast (no symbols list — cannot confirm implementation exists)
  • realtime.channel.broadcast_http (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.subscribe_presence (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.private_channel (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_self (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_ack (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_replay (no symbols list — cannot confirm implementation exists)
  • realtime.presence.track (no symbols list — cannot confirm implementation exists)
  • realtime.presence.untrack (no symbols list — cannot confirm implementation exists)
  • realtime.presence.presence_key (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.custom_websocket_transport (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.reconnect_backoff (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.heartbeat_interval (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.access_token_callback (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.deferred_disconnect (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.custom_logger (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.binary_protocol (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.get_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.list_file_buckets (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.update_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.delete_file_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.empty_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.access_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.upload (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.download (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.move (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.copy (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.remove (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.create_signed_url (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.create_signed_urls (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.create_signed_upload_url (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.upload_with_signed_url (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.update_file (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.file_exists (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.file_info (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.copy_cross_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.move_cross_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.upload_with_metadata (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.url_cache_nonce (no symbols list — cannot confirm implementation exists)

These may have been renamed, removed, or never registered. Please update the capability matrix.
See: https://github.com/supabase/sdk/blob/main/docs/capability-matrix.md

The scripts already document the flow in their own headers, and xcodebuild.sh
documents WARNINGS_FILE, so the section only restated CI plumbing that agents do
not act on. Reverts the dictionary entry it needed too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants